package com.chao.dataObject;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 商品
 */
@Table(name = "product_info")
@Entity
@Data
public class ProductInfo {

    /* 商品Id */
    @Id
    @Column(name = "product_id", columnDefinition = "varchar(32)")
    private String productId;

    /* 商品名字 */
    @Column(name = "product_name", columnDefinition = "varchar(64)")
    private String productName;

    /* 商品单价 */
    @Column(name = "product_price", columnDefinition = "decimal(8,2)")
    private BigDecimal productPrice;

    /* 商品库存 */
    private Integer productStock;

    /* 商品描述 */
    private String productDescription;

    /* 商品小图 */
    private String productIcon;

    /* 商品状态. 0正常, 1下架 */
    private Integer productStatus;

    /* 类目编号 */
    private Integer categoryType;



    public ProductInfo(String productId, String productName, BigDecimal productPrice, Integer productStock, String productDescription, String productIcon, Integer productStatus, Integer categoryType) {
        this.productId = productId;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productStock = productStock;
        this.productDescription = productDescription;
        this.productIcon = productIcon;
        this.productStatus = productStatus;
        this.categoryType = categoryType;
    }

    public ProductInfo() {

    }
}
